package com.hxd.mall.widget

import android.annotation.SuppressLint
import android.content.Context
import android.graphics.drawable.Drawable
import android.util.AttributeSet
import android.view.LayoutInflater
import android.view.View
import android.view.View.OnClickListener
import android.widget.Button
import android.widget.ImageView
import android.widget.LinearLayout
import android.widget.TextView
import androidx.core.content.ContextCompat
import com.hxd.mall.R
import com.hxd.mall.base.IBaseWidgetView
import com.hxd.mall.constant.HxdGlobalInfo
import com.hxd.mall.utils.open.FaskClickUitl
import com.hxd.mall.utils.open.NetUtil
import com.hxd.mall.utils.open.ToastUtil
import com.hxd.mall.utils.open.addSetOnClickListener
import com.hxd.mall.widget.verifycode.VerifyCodeView

/**
 * 验证码组件(input: 0 注册验证码，1忘记密码验证码)
 * 验证码支持4位或6位
 * Created by qishuai on 2018/7/23.
 */
@SuppressLint("SetTextI18n")
class SoftTextView(context: Context?, var attrs: AttributeSet?) : LinearLayout(context, attrs){

    // title name tv
    private lateinit var mTv: TextView
    private lateinit var mType: String


    init {
        initData()
        initView()
    }

     fun initView() {
        LayoutInflater.from(context).inflate(R.layout.view_soft_text, this)
        // get view
        mTv = this.findViewById(R.id.tv_text)

    }

     fun initData() {
        // 获取文本框类型
        val typeArray = context?.obtainStyledAttributes(attrs, R.styleable.softView)
//         mType = typeArray?.getString(R.styleable.softView_soft_type)?:""
        typeArray?.recycle()
    }


    //---------------------------------private method-------------------------------------------------
    /**
     * 修改手机号-验证码
     */
    private fun initViewUpdatePhoneNumberType() {

    }




}